﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CarFuel.aspx.cs" Inherits="Webcar.Car.CarFuel" %>
<%@ Register Assembly="WebPager" Namespace="DevCenterNew" TagPrefix="cc1" %>

<%@ Register Src="../SearchPanel.ascx" TagName="SearchPanel" TagPrefix="uc2" %>

<%@ Register Src="../Controls/NaviBar.ascx" TagName="NaviBar" TagPrefix="uc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>车辆油耗和公里</title>
</head>
<body style="margin:0px 0px 0px 0px; padding:0px 1px 0px 1px; overflow-y:hidden">
    <form id="form1" runat="server">
    <div>
        <uc1:NaviBar ID="NaviBar1" runat="server" />
        <uc2:SearchPanel ID="SearchPanel1" runat="server" OnSearchClick = "Seach_Click" />
        <asp:GridView ID="GridView1" SkinID="gridviewSkin" DataKeyNames="car_no,ny" AutoGenerateColumns="False" runat="server" Width="100%" OnRowDataBound="GridView1_RowDataBound" OnRowDeleting="GridView1_RowDeleting" OnRowCommand="GridView1_RowCommand">
            <Columns>

                <asp:TemplateField HeaderText="所属单位">
                    <ItemTemplate>
                        <asp:HyperLink ID="hlDeptName" runat="server" NavigateUrl="" Text='<%# Eval("dept_name") %>'></asp:HyperLink>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="月份">
                    <ItemTemplate>
                        <asp:HyperLink ID="hlNy" runat="server" NavigateUrl="" Text='<%# Eval("ny") %>'></asp:HyperLink>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="牌照号">
                    <ItemTemplate>
                        <asp:HyperLink ID="hlRecordNo" runat="server" NavigateUrl="" Text='<%# Eval("record_no") %>'></asp:HyperLink>
                    </ItemTemplate>
                </asp:TemplateField>
       <asp:BoundField DataField="read_mile" HeaderText="里程表读数" />         
                
                <asp:BoundField DataField="mile" HeaderText="本月公里数" />
                <asp:BoundField DataField="fuel_num" HeaderText="实际耗油量" />
                <asp:BoundField DataField="fuel_ration" HeaderText="计划单耗" />
                <asp:BoundField DataField="fact_ration" HeaderText="实际单耗" />
                <asp:TemplateField ShowHeader="False">
                    <ItemTemplate>
                        <asp:LinkButton ID="DeleteBtn" runat="server" Text='删除'  CommandName="Delete"></asp:LinkButton>
                        <asp:LinkButton ID="LinkButton1" runat="server" Text='编辑' CommandName="EditMile" CommandArgument='<%# Container.DataItemIndex %>'></asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
        <div class="pager">
            <div style="text-align:left;float:left;padding-top:1px">
                [ <asp:LinkButton ID="linkPrint" runat="server" Text="查看打印页" OnClick="linkPrint_Click"></asp:LinkButton>]
                <asp:HyperLink ID="HyperLink2" NavigateUrl="" runat="server">增加车辆油耗</asp:HyperLink>
                &nbsp;&nbsp;&nbsp;
                 <asp:Label ID="Label1" runat="server" Text="查看年度："></asp:Label>
                <asp:TextBox ID="tbYear" runat="server" Width="39px"></asp:TextBox>
            </div>
            <div class="p">
               
                
                <cc1:WebPager Width="400px" ID="WebPager1" runat="server" DisplayText="<span style='color: black'>第{0}页&nbsp共{1}页&nbsp总计{2}条&nbsp每页{3}条</span>"  />
            </div>
        </div>
        
    </div>
    </form>
</body>
</html>
